home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xm / XmTextFieldGetSubstring.z / XmTextFieldGetSubstring
Text File  |  1998-10-30  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVVXXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg - A TextField function that
  10.           retrieves a copy of a portion of the internal text buffer
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.           #include <Xm/TextF.h>
  14.           iiiinnnntttt XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg(
  15.           WWWWiiiiddddggggeeeetttt wwwwiiiiddddggggeeeetttt,
  16.           XXXXmmmmTTTTeeeexxxxttttPPPPoooossssiiiittttiiiioooonnnn ssssttttaaaarrrrtttt,
  17.           iiiinnnntttt nnnnuuuummmm____cccchhhhaaaarrrrssss,
  18.           iiiinnnntttt bbbbuuuuffffffffeeeerrrr____ssssiiiizzzzeeee,
  19.           cccchhhhaaaarrrr ****bbbbuuuuffffffffeeeerrrr);
  20.  
  21.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  22.           This page documents Motif 2.1.
  23.  
  24.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  25.           XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg retrieves a copy of a portion of the
  26.           internal text buffer of a TextField widget. The function
  27.           copies a specified number of characters from a given start
  28.           position in the internal text buffer into a buffer provided
  29.           by the application.  A NULL terminator is placed at the end
  30.           of the copied data.
  31.  
  32.           The size of the required buffer depends on the maximum
  33.           number of bytes per character (MMMMBBBB____CCCCUUUURRRR____MMMMAAAAXXXX) for the current
  34.           locale.  MMMMBBBB____CCCCUUUURRRR____MMMMAAAAXXXX is a macro defined in ssssttttddddlllliiiibbbb....hhhh. The
  35.           buffer should be large enough to contain the substring to be
  36.           copied and a NULL terminator. Use the following equation to
  37.           calculate the size of buffer the application should provide:
  38.  
  39.           _b_u_f_f_e_r__s_i_z_e = (_n_u_m__c_h_a_r_s* MB_CUR_MAX) + 1
  40.           (vvvvooooiiiidddd)
  41.  
  42.           _w_i_d_g_e_t    Specifies the TextField widget ID.
  43.  
  44.           _s_t_a_r_t     Specifies the beginning character position from
  45.                     which the data will be retrieved. This is an
  46.                     integer number of characters from the beginning of
  47.                     the text buffer. The first character position is 0
  48.                     (zero).
  49.  
  50.           _n_u_m__c_h_a_r_s Specifies the number of characters to be copied
  51.                     into the provided buffer.
  52.  
  53.           _b_u_f_f_e_r__s_i_z_e
  54.                     Specifies the size of the supplied buffer in
  55.                     bytes. This size should account for a NULL
  56.                     terminator.
  57.  
  58.           _b_u_f_f_e_r    Specifies the character buffer into which the
  59.                     internal text buffer will be copied.
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 10/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVVXXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnngggg((((3333XXXX))))
  71.  
  72.  
  73.  
  74.           For a complete definition of TextField and its associated
  75.           resources, see XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeelllldddd(3).
  76.  
  77.      RRRREEEETTTTUUUURRRRNNNN
  78.           XXXXmmmmCCCCOOOOPPPPYYYY____SSSSUUUUCCCCCCCCEEEEEEEEDDDDEEEEDDDD
  79.                     The function was successful.
  80.  
  81.           XXXXmmmmCCCCOOOOPPPPYYYY____FFFFAAAAIIIILLLLEEEEDDDD
  82.                     The function failed because it was unable to copy
  83.                     the specified number of characters into the buffer
  84.                     provided.  The buffer size may be insufficient.
  85.                     The contents of _b_u_f_f_e_r are undefined.
  86.  
  87.           XXXXmmmmCCCCOOOOPPPPYYYY____TTTTRRRRUUUUNNNNCCCCAAAATTTTEEEEDDDD
  88.                     The requested number of characters extended beyond
  89.                     the internal buffer. The function copied
  90.                     characters between _s_t_a_r_t and the end of the
  91.                     widget's buffer and terminated the string with a
  92.                     NULL terminator; fewer than _n_u_m__c_h_a_r_s characters
  93.                     were copied.
  94.  
  95.      RRRREEEELLLLAAAATTTTEEEEDDDD
  96.           XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeelllldddd(3) and XXXXmmmmTTTTeeeexxxxttttFFFFiiiieeeellllddddGGGGeeeettttSSSSuuuubbbbssssttttrrrriiiinnnnggggWWWWccccssss(3).
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 10/24/98)
  130.  
  131.  
  132.  
  133.